package edu.gdin.ecommerce.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ParamDetail entity. @author MyEclipse Persistence Tools
 */
@Table(name = "t_param_detail", catalog = "ecommerce")
@Entity
public class ParamDetail implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1791861343419370489L;
	private String paramDetailId;
	private ParamType paramType;
	private String name;
	private String value;
	private String detailDesc;

	// Constructors

	/** default constructor */
	public ParamDetail() {
	}

	/** full constructor */
	public ParamDetail(String paramDetailId, Integer paramTypeId, String name,
			String value, String detailDesc) {
		this.paramDetailId = paramDetailId;
//		this.paramTypeId = paramTypeId;
		this.name = name;
		this.value = value;
		this.detailDesc = detailDesc;
	}

	// Property accessors
	@Id
	@Column(name = "PARAM_DETAIL_ID", unique = true, nullable = false, length = 50)
	public String getParamDetailId() {
		return this.paramDetailId;
	}

	public void setParamDetailId(String paramDetailId) {
		this.paramDetailId = paramDetailId;
	}

	/*@Column(name = "PARAM_TYPE_ID", nullable = false)
	public Integer getParamTypeId() {
		return this.paramTypeId;
	}

	public void setParamTypeId(Integer paramTypeId) {
		this.paramTypeId = paramTypeId;
	}*/
	
	
	@ManyToOne(targetEntity=ParamType.class)
	@JoinColumn(name="PARAM_TYPE_ID")
	public ParamType getParamType() {
		return paramType;
	}

	public void setParamType(ParamType paramType) {
		this.paramType = paramType;
	}

	@Column(name = "NAME", nullable = false, length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "VALUE", nullable = false, length = 200)
	public String getValue() {
		return this.value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Column(name = "DETAIL_DESC", length = 200)
	public String getDetailDesc() {
		return this.detailDesc;
	}

	public void setDetailDesc(String detailDesc) {
		this.detailDesc = detailDesc;
	}

}